package com.zlm.website.controller;

import com.zlm.common.base.BaseController;
import com.zlm.common.dto.JsonResultDto;
import com.zlm.website.service.entity.WebsitePremiumCustomerDO;
import com.zlm.website.service.service.WebsitePremiumCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 优质客户controller
 *
 * @Author: duyufu
 * @Date: 2019/3/18 13:06
 */
@RestController
@RequestMapping(value = "/premiumCustomer")
public class PremiumCustomerController extends BaseController {

    @Autowired
    private WebsitePremiumCustomerService websitePremiumCustomerServiceImpl;

    /**
     * 获取所有优质客户
     *
     * @return
     */
    @GetMapping(value = "/getAllPremiumCustomer")
    public JsonResultDto getAllPremiumCustomer() {
        List<WebsitePremiumCustomerDO> premiumCustomerList = websitePremiumCustomerServiceImpl.getAll();
        return success(premiumCustomerList);
    }
}
